<template>
	<view class="pageBg">
		<view class="list">
			<view class="item flex" @click="protocol('user_service', '用户协议')">
				<view class="title">用户协议</view>
				<image class="cuIcon-right icon" src="/static/images/go.png" mode=""></image>
			</view>
			<view class="item flex" @click="protocol('privacy', '隐私政策')">
				<view class="title">隐私政策</view>
				<image class="cuIcon-right icon" src="/static/images/go.png" mode=""></image>
			</view>
			<view class="item flex" @click="about">
				<view class="title">关于我们</view>
				<image class="cuIcon-right icon" src="/static/images/go.png" mode=""></image>
			</view>
		</view>
		<view class="opt centerSubElements" @click="loginOut">
			<button form-type="submit" class="btn btnview">退出登录</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		methods: {
			about() {
				uni.navigateTo({
					url: '/pages/my/about/about',
				});
			},
			protocol(type, title) {
				uni.navigateTo({
					url: '/pages/my/protocol/protocol?type=' + type + '&title=' + title,
				});
			},
			loginOut() {
				uni.clearStorageSync();
				uni.reLaunch({
					url: '/pages/index/index',
				});
			},
		},
	};
</script>

<style lang="scss" scoped>
	.list {
		width: $connet-width;
		background-color: $content-bg-colcor;
		margin: $margin-width auto;
		line-height: 100rpx;
		border-radius: $border-radius;
		.item {
			justify-content: space-between;
			margin: 0 $margin-width;
			border-bottom: 1rpx solid $search-border-color;
			color: $title-colcor;
			align-items: center;
			.title {
				font-size: $uni-font-size-14;
				line-height: 100rpx;
			}
			.icon {
				width: 12rpx;
				height: 23rpx;
			}
			&:last-child {
				border: none;
			}
		}
	}
	.opt {
		position: fixed;
		bottom: 0;
		left: 0;
		height: 146rpx;
		width: 100%;
		border-top: 1rpx solid #dddddd;

		.btn {
			width: 690rpx;
			height: 80rpx;
			font-size: $uni-font-size-15;
			line-height: 80rpx;
		}
	}
</style>
